<template>
  <div class="home">
    <!-- 顶部导航栏 -->
    <div class="navbar">
      <div class="nav-back" @click="$router.go(-1)">
        <i class="fas fa-chevron-left"></i>
      </div>
    </div>
    <div class="bg-wrapper">
      <div class="bg-content"></div>
      <div class="buttons">
        <div class="buttonsitem">
          <button @click="go1()">咨询后打卡练习</button>
        </div>
        <div class="buttonsitem">
          <button @click="go2()">危机个案跟进</button>
        </div>
        <div class="buttonsitem">
          <button @click="go3()">心理赋能定制</button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      bubbles: [],
    };
  },
  created() {},
  methods: {
    go1() {
      this.$router.push({ name: "员工端-打卡练习" });
    },
    go2() {
      this.$router.push({
        path: "/wjfrom",
      });
    },
    go3() {
      this.$router.push({
        path: "/trial/funeng",
      });
    },
  },
};
</script>

<style scoped>
.home {
  position: relative;
  width: 100%;
  height: 100vh;
  background: linear-gradient(to bottom, #f2f7fb, #f5f9fa);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
/* 导航栏 */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  z-index: 1000;
}
.nav-back {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  border: none;
  cursor: pointer;
}

.nav-back:hover {
  background: #eef0ff;
}

.nav-title {
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.nav-placeholder {
  width: 40px;
}

.bg-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bg-content {
  width: 100%;
  height: 100%;
  background-image: url("https://lesson.iapeap.com/DRM/IMG/tab3.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.buttons {
  position: absolute;
  bottom: 30px; /* 距离底部一定距离 */
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column; /* 垂直排列 */
  align-items: center; /* 居中对齐 */
  gap: 15px; /* 按钮间距 */
  background-color: transparent; /* 移除背景色 */
}

.buttonsitem {
  width: auto; /* 根据内容自适应宽度 */
}

.buttons button {
  color: #5c615f;

  border: 0;
  background-color: #e1edf9;
  padding: 12px 20px;
  border-radius: 8px; /* 添加圆角 */
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加轻微阴影 */
  min-width: 220px; /* 设置最小宽度使按钮大小一致 */
  text-align: center;
}

.buttons button:hover {
  background-color: #c5dbf5;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
</style>
